package my.poemhelper.mb;

import my.poemhelper.Facade;
import my.poemhelper.vo.Idiom;
import my.poemhelper.vo.Words;



public class WordsMB extends BaseMB<Idiom>{
	
	private Words words  = new Words();
	private int count = 0;
	
	public WordsMB(){
		count = Facade.facade.getWordsCount();
	}
	public String addWords(){
		Words w2 = new Words();
		w2.setWords(words.getWords());
		w2.setInfo(words.getInfo());
		Facade.facade.insertWords(w2);
		words = new Words();
		count = Facade.facade.getWordsCount();
		return "";
	}
	
	@Override
	protected String getAddString() {
		return "wordsAdd";
	}
	public Words getWords() {
		return words;
	}
	public void setWords(Words words) {
		this.words = words;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	
}
